import { createRouter, createWebHistory } from 'vue-router'

import Layout from "@/layout/Layout";

const routes = [
  {
    path: '/',
    name: 'layout',
    redirect:'/meeting',
    component: Layout,
    children:[
      {
        path:'user',
        name:'User',
        component:()=>import("@/views/User")
      },{
        path: '/book',
        name: 'Book',
        component: () =>import("@/views/Book")
      },{
        path: '/meeting',
        name: 'Meeting',
        component: () =>import("@/views/Meeting")
      },{
        path: '/application',
        name: 'Application',
        component: () =>import("@/views/Application")
      },{
        path: '/person',
        name: 'Person',
        component: ()=>import("@/views/Person")
      },{
        path: '/order',
        name: 'Order',
        component: ()=>import("@/views/Order")
      },{
        path: '/im',
        name: 'Im',
        component: ()=>import("@/views/Im")
      },
    ]
  },{
    path: '/login',
    name: 'Login',
    component: () =>import("@/views/Login")
  },{
    path: '/register',
    name: 'Register',
    component: () =>import("@/views/Register")
  },

]

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
